home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8859 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: news.voicenet.com!news
  2. From: srccode@omni.voicenet.com (Tony O'Brien)
  3. Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++,comp.lang.basic.visual.misc
  4. Subject: Re: Prob calling VC++ 4.0 DLL from VB4 (32bit)
  5. Date: Tue, 27 Feb 1996 04:37:03 GMT
  6. Organization: Sourcecode, Inc
  7. Message-ID: <4gtnfr$q8o@news.voicenet.com>
  8. References: <4f7u8h$63q@fountain.mindlink.net> <3129a180.11614278@nntp.ix.netcom.com> <4ggs6j$4j1@fountain.mindlink.net>
  9. NNTP-Posting-Host: medford10.voicenet.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. a09748@giant.mindlink.bc.ca (ESSA) wrote:
  13.  
  14. >Bill Boland (billbo@ix.netcom.com) wrote:
  15. >: >Having a frustrating time trying to call a function in a DLL developed in
  16. >: >VC++ 4.0 from Visual Basic 4.0 (32bit). I'm getting VB error 49 (bad DLL
  17. >: >calling convention) from the following simple function ...
  18.  
  19. >: I may have a clue since I had a similar situation today.
  20. >: If a DLL is compiled with VB 4.0 WITHOUT a module definition file and
  21. >: uses  the new __declspec( dllexport ) to declare functions as
  22. >: exportable, VB4 cannot seem to understand them. At least that is what
  23. >: I discovered today on my own.
  24.  
  25. >Thanks Bill. And thanks Rob Ross of FTP Software, who got back to me after 
  26. >phoning MS support about the same problem.
  27. >In the root of the VB4 installation directory, there is a file called 
  28. >vb4dll.txt that explains a number of issues concerning 32bit DLL's, including
  29. >the problems I'd been having.
  30. >The solution, as Bill discovered (how many hours do you figure we've all 
  31. >collectively wasted ?) is the use of the DEF file.
  32.  
  33. >---
  34. >pwhiteside@essa.com
  35. >ESSA Software Ltd.
  36.  
  37. The DEF file is certainly useful but probably NOT the source of this
  38. error...You need to specify _STDCALL (calling convention) in the
  39. projects settings...
  40.  
  41. regards,
  42.  
  43.  
  44. Tony O'Brien
  45. Sourcecode, Inc.
  46. srccode@voicenet.com
  47.  
  48.